let yLabelColor='#00e7ea';//y轴字体颜色
let picLabelColor='#00eaec'//图形文字颜色
let pieWordColor='#fff';//文字颜色
let dashedColor='#c3c3b6';//X轴虚线颜色
let fontSize=30;
let splitLineDashed={
  color:'#00d6e9',
  show:true,
  lineStyle:{
    opacity:0.35,
    type:'dashed'
  }
}
let splitLineSolid={
  color:'#00d6e9',
  show:true,
  lineStyle:{
    opacity:0.35,
    type:'solid'
  }
}
import {newMakePandL,newMakePandY} from './public';
//十年竞争力指数
export const tenYearsOption={
  grid:{
    containLabel:true,
    top:140,
  },
  legend:{
    show:false,
    top:40,
    textStyle:{
      color:yLabelColor,
      fontSize:fontSize
    }
  },
  xAxis:{
    type: 'category',
    data:[2008,2009,2010,2011,2012,2013,2014,2015,2016,2017],
    axisLine:{
      show:false,
    },
    axisTick:{
      show:false
    },
    axisLabel:{
      show:true,
      color:yLabelColor,
      margin:40,
      fontSize:fontSize
    },
    splitLine:{
      show:false
    }
  },
  yAxis:{
    // name:'单位：%',
    nameTextStyle:{
      color: yLabelColor,
      padding:[0,35,0,0],
      fontSize:fontSize
    },
    type:'value',
    max:100,
    splitNumber:6,
    axisLine:{
      show:false,
    },
    axisTick:{
      show:false
    },
    axisLabel:{
      show:true,
      color:yLabelColor,
      fontSize:fontSize
    },
    splitLine:splitLineDashed
  },
  series:[
    {
      name:'数量',
      type:'line',
      symbol:'circle',
      symbolSize:14,
      itemStyle:{
        color:'#f8459b'
      },
      lineStyle:{
        color:'#f8459b',
        width:6
      },
      markPoint:newMakePandL(10).point,
      markLine:newMakePandL(10).line,
      data:[]
    }
  ]
}
//行业企业拥有专利数增长率
export const patentOption={
  grid:{
    containLabel:true,
    top:140,
  },
  legend:{
    top:40,
    textStyle:{
      color:yLabelColor,
      fontSize:fontSize
    }
  },
  xAxis:{
    type: 'category',
    data:[2013,2014,2015,2016,2017],
    axisLine:{
      show:false,
    },
    axisTick:{
      show:false
    },
    axisLabel:{
      show:true,
      color:yLabelColor,
      margin:50,
      fontSize:fontSize
    },
    splitLine:{
      show:false
    }
  },
  yAxis:[
    {
    // show:true,
    name:'单位：件',
    nameTextStyle:{
      color: yLabelColor,
      padding:[0,110,0,0],
      fontSize:fontSize
    },
    type:'value',
    max:14000,
    splitNumber:6,
    min:0,
    axisLine:{
      show:false,
    },
    axisTick:{
      show:false
    },
    axisLabel:{
      show:true,
      color:yLabelColor,
      fontSize:fontSize
    },
    splitLine:splitLineDashed
  },
    {
      name:'单位：%',
      nameTextStyle:{
        color: yLabelColor,
        padding:[0,0,0,35],
        fontSize:fontSize
      },
      type:'value',
      max:100,
      splitNum:5,
      axisLine:{
        show:false,
      },
      axisTick:{
        show:false
      },
      axisLabel:{
        show:true,
        color:yLabelColor,
        fontSize:fontSize
      },
      splitLine:splitLineDashed
    }
  ],
  series:[
    {
      type:'bar',
      barWidth: '107',
      data:[
        {
          value:70,
          itemStyle:{
            color:"#59b2ef"
          }
        },{
          value:40,
          itemStyle:{
            color:"#d87b7f"
          }
        },{
          value:90,
          itemStyle:{
            color:"#b6a3de"
          }
        },{
          value:200,
          itemStyle:{
            color:"#febb81"
          }
        },{
          value:100,
          itemStyle:{
            color:"#d05b23"
          }
        }
      ],
      itemStyle:{
        barBorderRadius:10,
      }
    },
    {
      type:'line',
      symbol:'circle',
      symbolSize:24,
      markPoint:newMakePandL(5,[0,30]).point,
    },
    {
      name:'增长率',
      data: [20, 132, 101, 134, 32],
      type: 'line',
      yAxisIndex:1,
      itemStyle:{
        color:'#71d261'
      },
      symbol:'circle',
      lineStyle:{
        width:8
      },
      symbolSize:20
    }
  ]
}
//工程技术人员比重指标得分
export const scoreOption={
  legend:{
    top:40,
    textStyle:{
      color:yLabelColor,
      fontSize:16
    }
  },
  grid:{
    containLabel:true,
    top:'10%',
  },
  xAxis:{
    name:'单位：%',
    nameTextStyle:{
      color: yLabelColor,
      padding:[100,0,0,0],
      fontSize:fontSize
    },
    nameGap:-20,
    type: 'value',
    max:10,
    min:0,
    splitNumber:5,
    axisLine:{
      show:false,
    },
    axisTick:{
      show:false
    },
    axisLabel:{
      show:true,
      color:yLabelColor,
      fontSize:fontSize
      // margin:50
    },
    splitLine:{
      show:false
    }
  },
  yAxis:
    {
      type:'category',
      data:[2013,2014,2015,2016,2017],
      axisLine:{
        show:false,
      },
      axisTick:{
        show:false
      },
      axisLabel:{
        show:true,
        color:yLabelColor,
        margin:50,
        fontSize:fontSize
      },
      splitLine:{
        show:false
      }
    },
  series:[
    {
      type:'line',
      symbol:'circle',
      symbolSize:14,
      markPoint:newMakePandY(10,[-20,0]).point,
    },
    {
      type:'bar',
      barWidth:75,
      data:[
        {
          value:10,
          itemStyle:{
            color:'#fddc7a'
          }
        },
        {
          value:70,
          itemStyle:{
            color:'#f37744'
          }
        },
        {
          value:80,
          itemStyle:{
            color:'#e41c22'
          }
        },
        {
          value:30,
          itemStyle:{
            color:'#87cacb'
          }
        },
        {
          value:60,
          itemStyle:{
            color:'#f3866b'
          }
        },
        {
          value:30,
          itemStyle:{
            color:'#c5b6da'
          }
        },
        {
          value:70,
          itemStyle:{
            color:'#f2ff20'
          }
        },
        {
          value:20,
          itemStyle:{
            color:'#d05b23'
          }
        },
        {
          value:45,
          itemStyle:{
            color:'#87203b'
          }
        },
        {
          value:35,
          itemStyle:{
            color:'#368b5f'
          }
        }
      ]
    }
  ]
}
//去年产品监督抽查情况
export const spoTheckFun=function(max,percent) {
  return [{
    value: percent,
    name: percent
  }, {
    value: max - percent,
    itemStyle: {
      normal: {
        color: 'transparent'
      }
    }
  }];
}
export const spoTheckOption={
  color:['#fddc7a','#b6a3de','#d87b7f','#5ab2ef','#78d136','#ef9410'],
  legend: {
    top: 30,
    right: 50,
    itemHeight: 18,
    data: ['包装问题不符合国家标准、行业标准','掺杂掺假','失效、变质','伪造产品产地','伪造或冒用日期','伪造或冒用认证标志问题'],
    textStyle: {
      color: yLabelColor,
      fontSize:fontSize
    },
    selectedMode: true,
    orient: "vertical",
  },
  series: [
    {
    name: '伪造或冒用认证标志问题',
    type: 'pie',
    clockWise: false, //顺时加载
    hoverAnimation: true, //鼠标移入变大
    radius: [10, 70],
    label: {
      show: true,
      position:'inside',
      fontSize:fontSize
    },
    data:spoTheckFun(1000,300)
  }, {
    name: '伪造或冒用日期',
    type: 'pie',
    clockWise: false, //顺时加载
    hoverAnimation: true, //鼠标移入变大
    radius: [70, 130],
    data:spoTheckFun(1000,500),
    label: {
      show: true,
      position:'inside',
      fontSize:fontSize
    },
  }, {
    name: '伪造产品产地',
    type: 'pie',
    clockWise: false, //顺时加载
    hoverAnimation: true, //鼠标移入变大
    radius: [130, 190],
    label: {
      show: true,
      position:'inside',
      fontSize:fontSize
    },
    data:spoTheckFun(1000,500)
  }, {
    name: '失效、变质',
    type: 'pie',
    clockWise: false, //顺时加载
    hoverAnimation: true, //鼠标移入变大
    radius: [190, 250],
      label: {
        show: true,
        position:'inside',
        fontSize:fontSize
      },
    data: spoTheckFun(1000,700)
  }, {
    name: '掺杂掺假',
    type: 'pie',
    clockWise: false, //顺时加载
    hoverAnimation: true, //鼠标移入变大
    radius: [250, 310],
      label: {
        show: true,
        position:'inside',
        fontSize:fontSize
      },
    data:spoTheckFun(1000,200)
  }, {
    name: '包装问题不符合国家标准、行业标准',
    type: 'pie',
    clockWise: false, //顺时加载
    hoverAnimation: true, //鼠标移入变大
    radius: [310, 370],
      label: {
        show: true,
        position:'inside',
        fontSize:fontSize
      },
    data:spoTheckFun(1000,190)
  }]
}
//去年举报投诉情况
export const complaintsOption={
  color:['#fddc7a','#b6a3de','#d87b7f','#5ab2ef','#78d136','#ef9410'],
  legend: {
    top: 30,
    right: 50,
    itemHeight: 18,
    data: ['包装问题不符合国家标准、行业标准','掺杂掺假','失效、变质','伪造产品产地','伪造或冒用日期','伪造或冒用认证标志问题'],
    textStyle: {
      color: yLabelColor,
      fontSize:fontSize
    },
    selectedMode: true,
    orient: "vertical",
  },
  series: [
    {
      name: '伪造或冒用认证标志问题',
      type: 'pie',
      clockWise: false, //顺时加载
      hoverAnimation: true, //鼠标移入变大
      radius: [10, 70],
      label: {
        show: true,
        position:'inside',
        fontSize:fontSize
      },
      data:spoTheckFun(1000,300)
    }, {
      name: '伪造或冒用日期',
      type: 'pie',
      clockWise: false, //顺时加载
      hoverAnimation: true, //鼠标移入变大
      radius: [70, 130],
      data:spoTheckFun(1000,500),
      label: {
        show: true,
        position:'inside',
        fontSize:fontSize
      },
    }, {
      name: '伪造产品产地',
      type: 'pie',
      clockWise: false, //顺时加载
      hoverAnimation: true, //鼠标移入变大
      radius: [130, 190],
      label: {
        show: true,
        position:'inside',
        fontSize:fontSize
      },
      data:spoTheckFun(1000,500)
    }, {
      name: '失效、变质',
      type: 'pie',
      clockWise: false, //顺时加载
      hoverAnimation: true, //鼠标移入变大
      radius: [190, 250],
      label: {
        show: true,
        position:'inside',
        fontSize:fontSize
      },
      data: spoTheckFun(1000,700)
    }, {
      name: '掺杂掺假',
      type: 'pie',
      clockWise: false, //顺时加载
      hoverAnimation: true, //鼠标移入变大
      radius: [250, 310],
      label: {
        show: true,
        position:'inside',
        fontSize:fontSize
      },
      data:spoTheckFun(1000,200)
    }, {
      name: '包装问题不符合国家标准、行业标准',
      type: 'pie',
      clockWise: false, //顺时加载
      hoverAnimation: true, //鼠标移入变大
      radius: [310, 370],
      label: {
        show: true,
        position:'inside',
        fontSize:fontSize
      },
      data:spoTheckFun(1000,190)
    }]
}

